<!--智慧消防V1.0-info页面-->
<template>
    <div class="app-container" ref="content">
        <div style="text-align: center;padding: 10px">巡检签到详情信息</div>
        <el-row :gutter="10">
            <el-col :xs="24" :sm="24" :md="24" :lg="5" :xl="5">
                <div style="text-align: center">
                    <img v-if="signTaskInfo.signPic" :src="signTaskInfo.signPic" class="avatar">
                    <i v-else class="el-icon-picture-outline avatar-uploader-icon"></i>
                    <div style="line-height: 44px">*签到图片*</div>
                </div>
            </el-col>
            <el-col :xs="24" :sm="24" :md="24" :lg="18" :xl="18">
                <el-form v-model="signTaskInfo">
                    <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
                        <el-form-item label="主体名称" prop="enterpriseName">
                            {{signTaskInfo.enterpriseName}}
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
                        <el-form-item label="任务名称"  prop="taskame">
                            {{signTaskInfo.taskName}}
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
                        <el-form-item label="设备名称" prop="equipmentName">
                            {{signTaskInfo.equipmentName}}
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
                        <el-form-item label="签到人员" prop="signUserName">
                            {{signTaskInfo.signUserName}}
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
                        <el-form-item label="签到时间" prop="signTime">
                            {{signTaskInfo.signTime | dateFormat}}
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
                        <el-form-item label="反馈状态" prop="feedbackStatus">
                            {{signTaskInfo.feedbackStatus==0?"正常":"异常"}}
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
                        <el-form-item label="反馈内容" prop="feedback">
                            {{signTaskInfo.feedback}}
                        </el-form-item>
                    </el-col>
                </el-form>
            </el-col>
        </el-row>
    </div>
</template>

<script>
import {getInspectionTaskSignVo} from "@/api/inspectionTaskSign";

export default {
    name: "info",
    data(){
        return{
            signTaskInfo:{

            }
        }
    },
    created() {
        this.$nextTick(() => {
            this.getInspectionTaskSignVo(this.$route.params.id)
        });
    },
    methods:{
        getInspectionTaskSignVo(val){
            //获取企业信息数据
            let loadingInstance = this.$loading({
                target:this.$refs.content,
                text:'数据加载中'
            });
            getInspectionTaskSignVo({id:val}).then(res=>{
                console.log(res)
                this.signTaskInfo = res.data
                loadingInstance.close()
                this.$notify.success({
                    title: '成功',
                    message: "获取巡检签到信息成功"
                })
            }).catch(error=>{
                console.log(error)
                loadingInstance.close()
                this.$notify.error({
                    title: '失败',
                    message: "获取巡检签到信息失败"
                })
            })
        }
    }
}
</script>

<style>
.avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 149px;
    height: 149px;
    line-height: 149px;
    text-align: center;
}
.avatar {
    width: 149px;
    height: 149px;
    display: block;
    margin: 0 auto; /*水平居中*/
}
.map-view{
    width: 100%;
    height: 200px;
}
</style>